package com.bw.mallshot;

import android.database.sqlite.SQLiteDatabase;

import com.alibaba.android.arouter.launcher.ARouter;
import com.bw.mvvm.BaseApplication;
import com.bw.my.mvvm.model.entity.usergreendao.DaoMaster;
import com.bw.my.mvvm.model.entity.usergreendao.DaoSession;
import com.bw.my.mvvm.model.entity.usergreendao.DaoSessionUtils;

public class App extends BaseApplication {

    @Override
    public void onCreate() {
        super.onCreate();
        ARouter.openLog();
        ARouter.openDebug();
        ARouter.init(this);
        DaoMaster.DevOpenHelper devOpenHelper = new DaoMaster.DevOpenHelper(this, "1902a");
        SQLiteDatabase writableDatabase = devOpenHelper.getWritableDatabase();
        DaoMaster daoMaster = new DaoMaster(writableDatabase);
        DaoSession daoSession = daoMaster.newSession();
        DaoSessionUtils.getInstance().setSession(daoSession);
    }
}
